package com.yearEndWorkload.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import lombok.Data;

/**
 * 专项工作绩效管理
 * @TableName specialized_work
 */
@TableName(value ="specialized_work")
@Data
public class SpecializedWork implements Serializable {
    /**
     * ID
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 年度
     */
    private String year;

    /**
     * 工作量类型
     */
    private String workloadType;

    /**
     * 项目内容
     */
    private String projectContext;

    /**
     * 分配分值
     */
    private BigDecimal score;

    /**
     * 是否二次分配
     */
    private String flagAllocation;

    /**
     * 负责人
     */
    private String responsiblePerson;

    /**
     * 录入人
     */
    private String reporter;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SpecializedWork other = (SpecializedWork) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getYear() == null ? other.getYear() == null : this.getYear().equals(other.getYear()))
            && (this.getWorkloadType() == null ? other.getWorkloadType() == null : this.getWorkloadType().equals(other.getWorkloadType()))
            && (this.getProjectContext() == null ? other.getProjectContext() == null : this.getProjectContext().equals(other.getProjectContext()))
            && (this.getScore() == null ? other.getScore() == null : this.getScore().equals(other.getScore()))
            && (this.getFlagAllocation() == null ? other.getFlagAllocation() == null : this.getFlagAllocation().equals(other.getFlagAllocation()))
            && (this.getResponsiblePerson() == null ? other.getResponsiblePerson() == null : this.getResponsiblePerson().equals(other.getResponsiblePerson()))
            && (this.getReporter() == null ? other.getReporter() == null : this.getReporter().equals(other.getReporter()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getYear() == null) ? 0 : getYear().hashCode());
        result = prime * result + ((getWorkloadType() == null) ? 0 : getWorkloadType().hashCode());
        result = prime * result + ((getProjectContext() == null) ? 0 : getProjectContext().hashCode());
        result = prime * result + ((getScore() == null) ? 0 : getScore().hashCode());
        result = prime * result + ((getFlagAllocation() == null) ? 0 : getFlagAllocation().hashCode());
        result = prime * result + ((getResponsiblePerson() == null) ? 0 : getResponsiblePerson().hashCode());
        result = prime * result + ((getReporter() == null) ? 0 : getReporter().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", year=").append(year);
        sb.append(", workloadType=").append(workloadType);
        sb.append(", projectContext=").append(projectContext);
        sb.append(", score=").append(score);
        sb.append(", flagAllocation=").append(flagAllocation);
        sb.append(", responsiblePerson=").append(responsiblePerson);
        sb.append(", reporter=").append(reporter);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}